package com.itheima.domain;

public class Student {
    //1.成员属性
    private String name;
    private String age;
    private String sex;
    //2.无参构造

    public Student() {
    }

    //3.全参构造

    public String getName() {
        return name;
    }


        //4.getter & setter
        public void setName(String name) {
            this.name = name;
        }

        public String getAge() {
            return age;
        }

        public void setAge(String age) {
            this.age = age;
        }

        public String getSex() {
            return sex;
        }

        public void setSex(String sex) {
            this.sex = sex;
        }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age='" + age + '\'' +
                ", sex='" + sex + '\'' +
                '}';
    }

    public Student(String name, String age, String sex) {
            this.name = name;
            this.age = age;
            this.sex = sex;

            //5.toString方法

    }
}
